﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DoubanApi.Helper
{
    [Serializable]
    public class DoubanListCollection<T> : System.Collections.ObjectModel.ObservableCollection<T> 
    {
        public override string ToString()
        {
            string temp = "";
            foreach (object obj in this.Cast<object>())
            {
                temp += "/" + obj.ToString();
            }
            if (temp.Length != 0)
            {
                temp = temp.Substring(1);
            }
            return temp;
        }

        public object First()
        {
            if (this.Count == 0)
            {
                return string.Empty;
            }
            else
            {
                return this[0];
            }
        }
    }
}
